<template>
  <Teleport to="body">
    <ElDrawer id="course-task-drawer" v-model="drawerVisible" size="70%" :with-header="false"
      :before-close="handleClose" destroy-on-close>
      <Task :course="course" class="h-full" />
    </ElDrawer>
  </Teleport>
</template>

<script setup lang='ts'>
import { CourseVo } from '../../api/manage';
import Task from './index.vue'
const drawerVisible = ref(false);
const course = ref<CourseVo>({
  id: 0
})
const handleClose = () => {
  drawerVisible.value = false
}
defineExpose({
  open(_course: CourseVo) {
    course.value = _course;
    drawerVisible.value = true
  },
  close() {
    drawerVisible.value = false
  }
})
</script>


